﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ADOWrapper.ObjectResolver;

namespace ADOWrapper.Test.ObjectResolver
{
    [TestClass]
    public class ObjectPopulatorTest
    {
        [TestMethod]
        public void Get()
        {

            Moq.Mock<IObjectPopulator<Random>> populatorMock = new Moq.Mock<IObjectPopulator<Random>>();

            ObjectPopulator<Random>.CustomPopulator = populatorMock.Object;
            
            Assert.IsInstanceOfType(ObjectPopulator<DateTime>.Get(), typeof(GenericPopulator<DateTime>));
            Assert.IsInstanceOfType(ObjectPopulator<Tuple<object>>.Get(), typeof(TuplePopulator<Tuple<object>>));
            Assert.AreEqual(ObjectPopulator<Random>.Get(), populatorMock.Object);
            
        }

        
    }
}
